import com.mapper.TbUserMapper;
import com.pojo.TbUser;
import com.pojo.User;
import com.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class TbUsersTest {
    @Test
    public void findUserTest(){
        SqlSession session = MyBatisUtils.getSession();
        User users= session.selectOne("com.mapper.TbUsersMapper.findUserWithOrders",1);
        System.out.println(users);
        session.close();
    }
    @Test
    public void SelectUserByIdTest(){
        SqlSession session = MyBatisUtils.getSession();
        TbUserMapper mapper = session.getMapper(TbUserMapper.class);
        TbUser users = mapper.selectUserById(1);
        System.out.println(users);
        session.close();
    }
}
